us.ihmc.mecano.multiBodySystem.interfaces.FloatingJointBasics.getJointAcceleration()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(97)

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

FloatingJointBasics.getJointAcceleration介绍

暂无

代码示例

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

/** {@inheritDoc} */
@Override
default void setJointAccelerationToZero()
{
 getJointAcceleration().setToZero();
}

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

/** {@inheritDoc} */
@Override
default void setJointLinearAcceleration(Vector3DReadOnly jointLinearAcceleration)
{
 getJointAcceleration().getLinearPart().set(jointLinearAcceleration);
}

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

/** {@inheritDoc} */
@Override
default void setJointAngularAcceleration(Vector3DReadOnly jointAngularAcceleration)
{
 getJointAcceleration().getAngularPart().set(jointAngularAcceleration);
}

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

/**
* Integrates the given {@code joint}'s acceleration and velocity to update its velocity and
* configuration.
* 
* @param joint the joint to integrate the state of. The joint configuration is modified.
*/
public void doubleIntegrateFromAcceleration(FloatingJointBasics joint)
{
 doubleIntegrate(joint.getJointAcceleration(), joint.getJointTwist(), joint.getJointPose());
}

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

private void compareJointAccelerations(double epsilon)
{
  boolean areEqual = true;
  String errorMessage = "Joint accelerations are not equal\n";
  String jointTriggerErrorMessage = "";
  FloatingJoint scsFloatingJoint = (FloatingJoint) robot.getRootJoints().get(0);
  SpatialAcceleration expected = extractFromFloatingJoint(scsFloatingJoint, floatingJoint.getFrameBeforeJoint(), floatingJoint.getFrameAfterJoint());
  if (!floatingJoint.getJointAcceleration().epsilonEquals(expected, epsilon))
  {
   areEqual = false;
   jointTriggerErrorMessage = " floating-joint";
  }
  errorMessage += "Floating joint:\nExpected: " + expected + "\nActual  : " + floatingJoint.getJointAcceleration();
  for (OneDoFJointBasics joint : allOneDoFJoints)
  {
   String jointName = joint.getName();
   OneDegreeOfFreedomJoint scsJoint = (OneDegreeOfFreedomJoint) robot.getJoint(jointName);
   if (!EuclidCoreTools.epsilonEquals(scsJoint.getQDD(), joint.getQdd(), epsilon))
   {
     areEqual = false;
     jointTriggerErrorMessage += " " + jointName;
   }
   errorMessage += "\n" + jointName + ",\texpected: " + String.format(FORMAT, scsJoint.getQDD()) + ",\tactual: "
      + String.format(FORMAT, joint.getQdd()) + ", difference: " + String.format(FORMAT, Math.abs(scsJoint.getQDD() - joint.getQdd()));
  }
  if (!areEqual)
  {
   throw new RuntimeException(errorMessage + "\nJoint(s) triggering error:" + jointTriggerErrorMessage);
  }
}

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

public boolean checkFullRobotModelRootJointAccelerationmatchesRobot(FloatingJoint floatingJoint, FloatingJointBasics sixDoFJoint, double epsilon)
{
 // Note: To get the acceleration, you can't just changeFrame on the acceleration provided by SCS. Use setBasedOnOriginAcceleration instead.
 ReferenceFrame elevatorFrame = sixDoFJoint.getFrameBeforeJoint();
 ReferenceFrame bodyFrame = sixDoFJoint.getFrameAfterJoint();
 Twist bodyTwist = new Twist();
 bodyTwist.setIncludingFrame(sixDoFJoint.getJointTwist());
 FrameVector3D originAcceleration = new FrameVector3D(elevatorFrame);
 FrameVector3D angularAcceleration = new FrameVector3D(bodyFrame);
 floatingJoint.getLinearAccelerationInWorld(originAcceleration);
 floatingJoint.getAngularAccelerationInBody(angularAcceleration);
 originAcceleration.changeFrame(elevatorFrame);
 //TODO: These should be from the inverse dynamics to the SCS frames...
 originAcceleration.changeFrame(ReferenceFrame.getWorldFrame());
 computedRootJointLinearAcceleration.set(originAcceleration);
 computedRootJointAngularAcceleration.set(angularAcceleration);
 SpatialAcceleration spatialAccelerationVectorOfSimulatedRootJoint = new SpatialAcceleration(bodyFrame, elevatorFrame, bodyFrame);
 spatialAccelerationVectorOfSimulatedRootJoint.setBasedOnOriginAcceleration(angularAcceleration, originAcceleration, bodyTwist);
 SpatialAcceleration spatialAccelerationVectorOfInverseDynamicsRootJoint = new SpatialAcceleration();
 spatialAccelerationVectorOfInverseDynamicsRootJoint.setIncludingFrame(sixDoFJoint.getJointAcceleration());
 return spatialAccelerationVectorOfInverseDynamicsRootJoint.epsilonEquals(spatialAccelerationVectorOfInverseDynamicsRootJoint, epsilon);
}

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

spatialAccelerationVector.setIncludingFrame(sixDoFJoint.getJointAcceleration());
originAcceleration.setIncludingFrame(spatialAccelerationVector.getLinearPart());
originAcceleration.changeFrame(ReferenceFrame.getWorldFrame());

相关文章