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

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

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

FloatingJointBasics.getJointWrench介绍

暂无

代码示例

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

/** {@inheritDoc} */
@Override
default void setJointTauToZero()
{
 getJointWrench().setToZero();
}

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

/** {@inheritDoc} */
@Override
default void setJointTorque(Vector3DReadOnly jointTorque)
{
 getJointWrench().getAngularPart().set(jointTorque);
}

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

/** {@inheritDoc} */
  @Override
  default void setJointForce(Vector3DReadOnly jointForce)
  {
   getJointWrench().getLinearPart().set(jointForce);
  }
}

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

rootJointWrench.setIncludingFrame(rootJoint.getJointWrench());

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

public void setRobotTorquesToMatchFullRobotModel()
{
 FloatingJointBasics rootJoint = fullRobotModel.getRootJoint();
 ReferenceFrame bodyFixedFrame = fullRobotModel.getPelvis().getBodyFixedFrame();
 Wrench rootJointWrench = new Wrench(bodyFixedFrame, bodyFixedFrame);
 rootJointWrench.setIncludingFrame(rootJoint.getJointWrench());
 rootJointWrench.changeFrame(bodyFixedFrame);
 FrameVector3D rootJointForce = new FrameVector3D(rootJointWrench.getLinearPart());
 FrameVector3D rootJointTorque = new FrameVector3D(rootJointWrench.getAngularPart());
 rootJointForce.changeFrame(ReferenceFrame.getWorldFrame());
 rootJointTorque.changeFrame(ReferenceFrame.getWorldFrame());
 computedRootJointForces.set(rootJointForce);
 computedRootJointTorques.set(rootJointTorque);
 rootJointExternalForcePoint.setForce(new Vector3D(rootJointForce));
 rootJointExternalForcePoint.setMoment(new Vector3D(rootJointTorque));
 FramePoint3D rootJointPosition = new FramePoint3D(bodyFixedFrame);
 rootJointPosition.changeFrame(ReferenceFrame.getWorldFrame());
 rootJointExternalForcePoint.setOffsetWorld(rootJointPosition);
 ArrayList<OneDegreeOfFreedomJoint> oneDegreeOfFreedomJoints = new ArrayList<OneDegreeOfFreedomJoint>();
 robot.getAllOneDegreeOfFreedomJoints(oneDegreeOfFreedomJoints);
 for (OneDegreeOfFreedomJoint oneDegreeOfFreedomJoint : oneDegreeOfFreedomJoints)
 {
   OneDoFJointBasics oneDoFJoint = fullRobotModel.getOneDoFJointByName(oneDegreeOfFreedomJoint.getName());
   double inverseDynamicsTorque = oneDoFJoint.getTau();
   oneDegreeOfFreedomJoint.setTau(inverseDynamicsTorque);
   YoDouble computedJointTorque = computedJointTorques.get(oneDoFJoint);
   computedJointTorque.set(inverseDynamicsTorque);
 }
}

相关文章