gpt4 book ai didi

us.ihmc.robotics.screwTheory.Wrench.sub()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-26 05:57:05 27 4
gpt4 key购买 nike

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

Wrench.sub介绍

[英]Subtracts another wrench from this one, after performing some reference frame checks.
[中]在执行一些参考系检查后,从这个扳手中减去另一个扳手。

代码示例

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

public void sub(Wrench wrench)
{
 putYoValuesIntoWrench();
 this.wrench.sub(wrench);
 getYoValuesFromWrench();
}

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

private void computeJointWrenchesAndTorques()
{
 for (int jointIndex = allJoints.size() - 1; jointIndex >= 0; jointIndex--)
 {
   InverseDynamicsJoint joint = allJoints.get(jointIndex);
   RigidBody successor = joint.getSuccessor();
   Wrench jointWrench = jointWrenches.get(joint);
   jointWrench.set(netWrenches.get(successor));
   Wrench externalWrench = externalWrenches.get(successor);
   jointWrench.sub(externalWrench);
   List<InverseDynamicsJoint> childrenJoints = successor.getChildrenJoints();
   for (int childIndex = 0; childIndex < childrenJoints.size(); childIndex++)
   {
    InverseDynamicsJoint child = childrenJoints.get(childIndex);
    if (!jointsToIgnore.contains(child))
    {
      Wrench wrenchExertedOnChild = jointWrenches.get(child);
      ReferenceFrame successorFrame = successor.getBodyFixedFrame();
      wrenchExertedByChild.set(wrenchExertedOnChild);
      wrenchExertedByChild.changeBodyFrameAttachedToSameBody(successorFrame);
      wrenchExertedByChild.scale(-1.0); // Action = -reaction
      wrenchExertedByChild.changeFrame(jointWrench.getExpressedInFrame());
      jointWrench.sub(wrenchExertedByChild);
    }
   }
   joint.setTorqueFromWrench(jointWrench);
 }
}

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

private void cancelHandWeight(RobotSide robotSide, Wrench wrenchToSubstractHandWeightTo, ReferenceFrame measurementFrame)
{
 CenterOfMassReferenceFrame handCoMFrame = handCenterOfMassFrames.get(robotSide);
 handCoMFrame.update();
 tempWristForce.setIncludingFrame(worldFrame, 0.0, 0.0, -handsMass.get(robotSide).getDoubleValue() * gravity);
 tempWristForce.changeFrame(handCoMFrame);
 wristWrenchDueToGravity.setToZero(measurementFrame, handCoMFrame);
 wristWrenchDueToGravity.setLinearPart(tempWristForce);
 wristWrenchDueToGravity.changeFrame(measurementFrame);
 wrenchToSubstractHandWeightTo.sub(wristWrenchDueToGravity);
}

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

private void cancelHandWeight(RobotSide robotSide, Wrench wrenchToSubstractHandWeightTo, ReferenceFrame measurementFrame)
{
 CenterOfMassReferenceFrame handCoMFrame = wristsubtreeCenterOfMassFrames.get(robotSide);
 handCoMFrame.update();
 tempForce.setIncludingFrame(worldFrame, 0.0, 0.0, -wristSubtreeMass.get(robotSide).getDoubleValue() * gravity);
 tempForce.changeFrame(handCoMFrame);
 wristWrenchDueToGravity.setToZero(measurementFrame, handCoMFrame);
 wristWrenchDueToGravity.setLinearPart(tempForce);
 wristWrenchDueToGravity.changeFrame(measurementFrame);
 wrenchToSubstractHandWeightTo.sub(wristWrenchDueToGravity);
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com