gpt4 book ai didi

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

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

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

Wrench.changeBodyFrameAttachedToSameBody介绍

暂无

代码示例

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

@Override
public void getWrench(Wrench wrenchToPack)
{
 wrenchToPack.changeBodyFrameAttachedToSameBody(measurementFrame);
 wrenchToPack.set(measurementFrame, wrench);
}

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

public Wrench computeTotalExternalWrench(ReferenceFrame referenceFrame)
{
 Wrench totalGroundReactionWrench = new Wrench(referenceFrame, referenceFrame);
 Wrench temporaryWrench = new Wrench();
 for (int i = 0; i < listOfBodiesWithExternalWrenches.size(); i++)
 {
   Wrench externalWrench = externalWrenches.get(listOfBodiesWithExternalWrenches.get(i));
   temporaryWrench.set(externalWrench);
   temporaryWrench.changeFrame(referenceFrame);
   temporaryWrench.changeBodyFrameAttachedToSameBody(referenceFrame);
   totalGroundReactionWrench.add(temporaryWrench);
 }
 return totalGroundReactionWrench;
}

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

public void computeTotalWrench(Wrench totalGroundReactionWrenchToPack, Collection<Wrench> wrenches, ReferenceFrame referenceFrame)
  {
   totalGroundReactionWrenchToPack.setToZero(referenceFrame, referenceFrame);

   for (Wrench wrench : wrenches)
   {
     temporaryWrench.set(wrench);
     temporaryWrench.changeFrame(referenceFrame);
     temporaryWrench.changeBodyFrameAttachedToSameBody(referenceFrame);
     totalGroundReactionWrenchToPack.add(temporaryWrench);
   }
  }
}

代码示例来源: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 setFootMeasuredWrenches()
{
 for (RobotSide robotSide : RobotSide.values)
 {
   WrenchBasedFootSwitch wrenchBasedFootSwitch = wrenchBasedFootSwitches.get(robotSide);
   wrenchBasedFootSwitch.computeAndPackFootWrench(tempWrench);
   RigidBody foot = wrenchBasedFootSwitch.getContactablePlaneBody().getRigidBody();
   tempWrench.changeBodyFrameAttachedToSameBody(foot.getBodyFixedFrame());
   tempWrench.changeFrame(foot.getBodyFixedFrame());
   inverseDynamicsCalculator.setExternalWrench(foot, tempWrench);
 }
}

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

wrench.changeBodyFrameAttachedToSameBody(controlledBody.getBodyFixedFrame());
groundReactionWrenches.put(controlledBody, wrench);

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

externalWrenchSolution.get(rigidBody).changeBodyFrameAttachedToSameBody(rigidBody.getBodyFixedFrame());
externalWrenchSolution.get(rigidBody).negate();

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

private void handleSpatialAccelerationCommand(SpatialAccelerationCommand command)
{
 RigidBody controlledBody = command.getEndEffector();
 SpatialAccelerationVector accelerationVector = command.getSpatialAcceleration();
 accelerationVector.changeBaseFrameNoRelativeAcceleration(ReferenceFrame.getWorldFrame());
 twistCalculator.getTwistOfBody(tmpTwist, controlledBody);
 tmpWrench.setToZero(accelerationVector.getBodyFrame(), accelerationVector.getExpressedInFrame());
 conversionInertias.get(controlledBody).computeDynamicWrenchInBodyCoordinates(accelerationVector, tmpTwist, tmpWrench);
 tmpWrench.changeBodyFrameAttachedToSameBody(controlledBody.getBodyFixedFrame());
 tmpWrench.changeFrame(ReferenceFrame.getWorldFrame());
 VirtualWrenchCommand virtualWrenchCommand = new VirtualWrenchCommand();
 virtualWrenchCommand.set(controlledBody, tmpWrench, command.getSelectionMatrix());
 virtualWrenchCommandList.addCommand(virtualWrenchCommand);
 if (controlledBody == controlRootBody)
 {
   tmpExternalWrench.set(tmpWrench);
   tmpExternalWrench.negate();
   tmpExternalWrench.changeFrame(controlledBody.getBodyFixedFrame());
   optimizationControlModule.submitExternalWrench(controlledBody, tmpExternalWrench);
 }
 optimizationControlModule.addSelection(command.getSelectionMatrix());
}

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

public void control(SpatialAccelerationVector handSpatialAccelerationVector, Wrench toolWrench)
{
 if (!hasBeenInitialized)
 {
   update();
   initialize();
 }
 update();
 toolAcceleration.set(handSpatialAccelerationVector);
 toolAcceleration.changeFrameNoRelativeMotion(toolJoint.getFrameAfterJoint());
 // TODO: Take relative acceleration between uTorsoCoM and elevator in account
 toolAcceleration.changeBaseFrameNoRelativeAcceleration(elevatorFrame);
 toolAcceleration.changeBodyFrameNoRelativeAcceleration(toolJoint.getFrameAfterJoint());
 toolJoint.setDesiredAcceleration(toolAcceleration);
 inverseDynamicsCalculator.compute();
 inverseDynamicsCalculator.getJointWrench(toolJoint, toolWrench);
 toolWrench.negate();
 toolWrench.changeFrame(handFixedFrame);
 toolWrench.changeBodyFrameAttachedToSameBody(handFixedFrame);
 // Visualization
 temporaryVector.setIncludingFrame(handFixedFrame, toolWrench.getLinearPartX(), toolWrench.getLinearPartY(), toolWrench.getLinearPartZ());
 temporaryVector.changeFrame(ReferenceFrame.getWorldFrame());
 temporaryVector.scale(0.01);
 objectForceInWorld.set(temporaryVector);
}

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

tmpWrench.changeBodyFrameAttachedToSameBody(controlledBody.getBodyFixedFrame());
tmpWrench.changeFrame(ReferenceFrame.getWorldFrame());

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

wrench.changeBodyFrameAttachedToSameBody(controlledBody.getBodyFixedFrame());
wrench.changeBodyFrameAttachedToSameBody(controlledBody.getBodyFixedFrame());

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